package com.zqu.service.impl;

import com.zqu.mapper.ClientTypeMapper;
import com.zqu.pojo.ClientType;
import com.zqu.service.ClientTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ClientTypeServiceImpl implements ClientTypeService {

    @Autowired(required = false)
    private ClientTypeMapper clientTypeMapper;

    @Override
    public ClientType selectClientTypeById(long id) {
        return clientTypeMapper.selectTById(id);
    }

    @Override
    public List<ClientType> selectList(ClientType clientType) {
        return clientTypeMapper.selectList(clientType);
    }

    @Override
    public boolean insertClientType(ClientType clientType) {
        return clientTypeMapper.insertT(clientType)>0;
    }

    @Override
    public boolean updateClientType(ClientType clientType) {
        return clientTypeMapper.updateT(clientType)>0;
    }

    @Override
    public boolean deleteClientType(long id) {
        return clientTypeMapper.deleteT(id)>0;
    }

    @Override
    public boolean deleteClientTypeByIds(String[] ids) {
        return clientTypeMapper.deleteTByIds(ids)>0;
    }
}
